package com.example.controller;

import java.util.Map;

import org.springframework.web.bind.annotation.MatrixVariable;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.fasterxml.jackson.core.sym.Name;

@RestController
public class IndexController {

	@RequestMapping(value = "/hello",method = RequestMethod.GET)
	public String hello1(@RequestHeader("User-Agent") String userAgent,
					@RequestHeader Map<String, String> header,
					@MatrixVariable("low") Integer low
			) {
		return "GET";
	}
	
	@RequestMapping(value = "/hello",method = RequestMethod.POST)
	public String hello2(String id,String name) {
		return "POST";
	}
	
	@RequestMapping(value = "/hello",method = RequestMethod.PUT)
	public String hello3() {
		return "PUT";
	}
	
	@RequestMapping(value = "/hello",method = RequestMethod.DELETE)
	public String hello4() {
		return "DELETE";
	}
	
	@PostMapping(name = "/method")
	@ModelAttribute
//	@RequestAttribute
//	@RequestPart
//	@RequestParam
	public static final int method() {
		String age = "";
		String name = " hello world ";
		return 0;
	}
	
	
}




